package com.jlu.yygh.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jlu.yygh.mapper.AdminMapper;
import com.jlu.yygh.model.user.Admin;
import com.jlu.yygh.service.AdminService;
import org.springframework.stereotype.Service;

@Service
public class AdminServiceImpl extends ServiceImpl<AdminMapper,Admin> implements AdminService {

  @Override
  public Admin getAdmin(String username) {
    QueryWrapper<Admin> wrapper = new QueryWrapper<>();
    wrapper.eq("name",username);
    Admin admin = baseMapper.selectOne(wrapper);
    return admin;
  }
}
